package com.fr.report.io.xml;

import com.fr.base.FRContext;
import com.fr.base.NameStyle;
import com.fr.base.Painter;
import com.fr.base.StringUtils;
import com.fr.base.Style;
import com.fr.base.XMLable;
import com.fr.base.core.BaseCoreUtils;
import com.fr.base.core.ComparatorUtils;
import com.fr.base.core.DateUtils;
import com.fr.base.core.FRCoreContext;
import com.fr.base.xml.BaseXMLUtils;
import com.fr.base.xml.XMLObject;
import com.fr.base.xml.XMLReadable;
import com.fr.base.xml.XMLWriter;
import com.fr.base.xml.XMLableReader;
import com.fr.chart.ChartCollection;
import com.fr.chart.ChartPainter;
import com.fr.chart.core.ChartXMLCompatibleUtils;
import com.fr.chart.core.FoldLine;
import com.fr.chart.core.Glyph;
import com.fr.chart.core.LineGlyph;
import com.fr.chart.core.glyph.CategoryAxis3DGlyph;
import com.fr.chart.core.glyph.CategoryAxisGlyph;
import com.fr.chart.core.glyph.CompositeGlyph;
import com.fr.chart.core.glyph.RadarAxisGlyph;
import com.fr.chart.core.glyph.ShapeGlyph;
import com.fr.chart.core.glyph.TextGlyph;
import com.fr.chart.core.glyph.ValueAxis3DGlyph;
import com.fr.chart.core.glyph.ValueAxisGlyph;
import com.fr.chart.shape3d.Area3D;
import com.fr.chart.shape3d.Cubic;
import com.fr.chart.shape3d.Cylinder;
import com.fr.chart.shape3d.FoldLine3D;
import com.fr.chart.shape3d.Pie3D;
import com.fr.data.ChartData;
import com.fr.data.DMLConfigJob;
import com.fr.data.SubmitJob;
import com.fr.data.core.define.FilterDefinition;
import com.fr.data.core.define.MoreNameCDDefinition;
import com.fr.data.core.define.OneValueCDDefinition;
import com.fr.data.impl.ReportChartData;
import com.fr.data.impl.TableChartData;
import com.fr.data.impl.TableColumn;
import com.fr.data.impl.TopChartData;
import com.fr.report.CellElement;
import com.fr.report.FloatElement;
import com.fr.report.Report;
import com.fr.report.WorkSheet;
import com.fr.report.cellElement.BarcodePresent;
import com.fr.report.cellElement.DefaultPresent;
import com.fr.report.cellElement.DictPresent;
import com.fr.report.cellElement.Formula;
import com.fr.report.cellElement.FormulaPresent;
import com.fr.report.cellElement.Present;
import com.fr.report.cellElement.TextFormat;
import com.fr.report.cellElement.core.ConditionGroup;
import com.fr.report.cellElement.core.CustomGrouper;
import com.fr.report.cellElement.core.DSColumn;
import com.fr.report.cellElement.core.FunctionGrouper;
import com.fr.report.cellElement.core.IndexGrouper;
import com.fr.report.cellElement.core.MonoGrouper;
import com.fr.report.cellElement.core.RecordGrouper;
import com.fr.report.cellElement.core.ResultSubReport;
import com.fr.report.cellElement.core.SubReport;
import com.fr.report.cellElement.core.SummaryGrouper;
import com.fr.report.highlight.BackgroundHighlightAction;
import com.fr.report.highlight.BorderHighlightAction;
import com.fr.report.highlight.ColWidthHighlightAction;
import com.fr.report.highlight.DefaultHighlight;
import com.fr.report.highlight.FRFontHighlightAction;
import com.fr.report.highlight.ForegroundHighlightAction;
import com.fr.report.highlight.Highlight;
import com.fr.report.highlight.HighlightAction;
import com.fr.report.highlight.HyperlinkHighlightAction;
import com.fr.report.highlight.PaddingHighlightAction;
import com.fr.report.highlight.PageHighlightAction;
import com.fr.report.highlight.PresentHighlightAction;
import com.fr.report.highlight.RowHeightHighlightAction;
import com.fr.report.highlight.ValueHighlightAction;
import com.fr.report.highlight.WidgetHighlightAction;
import com.fr.report.js.EmailHyperlink;
import com.fr.report.js.JavaScript;
import com.fr.report.js.ReportletHyperlink;
import com.fr.report.js.WebHyperlink;
import com.fr.report.painter.BiasTextPainter;
import com.fr.report.painter.shape.IssoscelesTriangleShapePainter;
import com.fr.report.painter.shape.OvalShapePainter;
import com.fr.report.painter.shape.RectangleShapePainter;
import com.fr.report.painter.shape.ShapePainter;
import com.fr.report.parameter.ClassParameterProcessor;
import com.fr.report.parameter.CustomParameterUI;
import com.fr.report.parameter.Parameter;
import com.fr.report.parameter.ParameterProcessor;
import com.fr.report.parameter.ParameterUI;
import com.fr.report.parameter.processor.FormulaUnitProcessor;
import com.fr.report.parameter.processor.SQLQueryUnitProcessor;
import com.fr.report.parameter.processor.UnitProcessor;
import com.fr.report.script.Primitive;
import com.fr.report.script.core.FArray;
import com.fr.report.web.ui.Button;
import com.fr.report.web.ui.ComboBox;
import com.fr.report.web.ui.ComboCheckBox;
import com.fr.report.web.ui.DateEditor;
import com.fr.report.web.ui.DateTimeEditor;
import com.fr.report.web.ui.FieldEditor;
import com.fr.report.web.ui.FileEditor;
import com.fr.report.web.ui.NumberEditor;
import com.fr.report.web.ui.TextEditor;
import com.fr.report.web.ui.Widget;
import com.fr.report.web.ui.impl.form.FormResetButton;
import com.fr.report.web.ui.impl.form.FormSubmitButton;
import com.fr.report.write.config.DMLConfig;
import com.fr.report.write.config.IntelliDMLConfig;
import com.fr.util.Utils;
import com.fr.web.core.service.AttachmentService;
import java.awt.Color;
import java.awt.Image;
import java.awt.Shape;
import java.awt.geom.Arc2D;
import java.awt.geom.Arc2D.Double;
import java.awt.geom.Arc2D.Float;
import java.awt.geom.GeneralPath;
import java.awt.geom.PathIterator;
import java.awt.geom.Rectangle2D;
import java.awt.geom.Rectangle2D.Double;
import java.awt.geom.Rectangle2D.Float;
import java.awt.geom.RectangularShape;
import java.awt.geom.RoundRectangle2D;
import java.awt.geom.RoundRectangle2D.Double;
import java.awt.geom.RoundRectangle2D.Float;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.text.Format;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Hashtable;
import java.util.logging.Level;
import java.util.logging.Logger;

public class ReportXMLUtils
{
  private static final Hashtable threadNameWidgetMap462 = new Hashtable();
  private static final int[] PasswordMaskArray = { 19, 78, 10, 15, 100, 213, 43, 23 };

  public static Report readReportFromClassName(String paramString)
  {
    Object localObject;
    if ((paramString.endsWith(".WorkSheet")) || (paramString.endsWith(".LinearReport")) || (paramString.endsWith(".ComplexBindSheet")) || (paramString.endsWith(".ComplexSheet")) || (paramString.endsWith(".ExpandBindSheet")) || (paramString.endsWith(".ExpandSheet")))
      localObject = new WorkSheet();
    else
      try
      {
        Class localClass = FRCoreContext.classForName(paramString);
        localObject = (Report)localClass.newInstance();
      }
      catch (Exception localException)
      {
        FRContext.getLogger().log(Level.WARNING, localException.getMessage(), localException);
        localObject = new WorkSheet();
      }
    if (localObject == null)
      localObject = new WorkSheet();
    return ((Report)localObject);
  }

  public static void writeXMLable(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter, XMLable paramXMLable, String paramString)
  {
    if (paramXMLable == null)
      return;
    paramXMLPrintWriter.startTAG(paramString).attr("class", paramXMLable.getClass().getName());
    paramXMLable.writeXML(paramXMLPrintWriter);
    paramXMLPrintWriter.end();
  }

  public static XMLable readXMLable(XMLableReader paramXMLableReader)
  {
    String str = null;
    XMLable localXMLable = null;
    if ((str = paramXMLableReader.getAttr("class")) != null)
      try
      {
        localXMLable = (XMLable)FRCoreContext.classForName(str).newInstance();
        paramXMLableReader.readXMLObject(localXMLable);
      }
      catch (Exception localException)
      {
        if (localException instanceof ClassNotFoundException)
          break label60:
        FRContext.getLogger().log(Level.WARNING, localException.getMessage(), localException);
      }
    label60: return localXMLable;
  }

  public static void writeFormat(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter, Format paramFormat)
  {
    paramXMLPrintWriter.startTAG("Format").attr("class", paramFormat.getClass().getName());
    if (paramFormat instanceof DecimalFormat)
      paramXMLPrintWriter.textNode(((DecimalFormat)paramFormat).toPattern());
    else if (paramFormat instanceof SimpleDateFormat)
      paramXMLPrintWriter.textNode(((SimpleDateFormat)paramFormat).toPattern());
    paramXMLPrintWriter.end();
  }

  public static Format readFormat(XMLableReader paramXMLableReader)
  {
    String str1;
    Object localObject = null;
    if ((str1 = paramXMLableReader.getAttr("class")) != null)
      if (str1.endsWith(".TextFormat"))
        localObject = TextFormat.getInstance();
      else if (str1.endsWith(".DecimalFormat"))
        localObject = new DecimalFormat();
      else if (str1.endsWith(".SimpleDateFormat"))
        localObject = new SimpleDateFormat();
      else
        try
        {
          localObject = (Format)FRCoreContext.classForName(str1).newInstance();
        }
        catch (Exception localException)
        {
          FRContext.getLogger().log(Level.WARNING, localException.getMessage(), localException);
        }
    else
      localObject = TextFormat.getInstance();
    if (localObject != null)
    {
      String str2 = null;
      if ((str1 = paramXMLableReader.getElementValue()) != null)
        str2 = str1;
      if (localObject instanceof DecimalFormat)
        ((DecimalFormat)localObject).applyPattern(str2);
      else if (localObject instanceof SimpleDateFormat)
        ((SimpleDateFormat)localObject).applyPattern(str2);
    }
    return ((Format)localObject);
  }

  public static DMLConfig readDMLConfig(XMLableReader paramXMLableReader)
  {
    String str = paramXMLableReader.getAttr("class");
    if (str == null)
      return null;
    Object localObject = null;
    if (str.endsWith(".IntelliDMLConfig"))
      localObject = new IntelliDMLConfig();
    else
      try
      {
        localObject = (DMLConfig)FRCoreContext.classForName(str).newInstance();
      }
      catch (Exception localException)
      {
        FRContext.getLogger().log(Level.WARNING, localException.getMessage(), localException);
      }
    if (localObject != null)
      paramXMLableReader.readXMLObject((XMLReadable)localObject);
    return ((DMLConfig)localObject);
  }

  public static SubmitJob readSubmitJob(XMLableReader paramXMLableReader)
  {
    String str = paramXMLableReader.getAttr("class");
    if (str == null)
      return null;
    Object localObject = null;
    if (str.endsWith(".DMLConfigJob"))
      localObject = new DMLConfigJob();
    else
      try
      {
        localObject = (SubmitJob)FRCoreContext.classForName(str).newInstance();
      }
      catch (Exception localException)
      {
        FRContext.getLogger().log(Level.WARNING, localException.getMessage(), localException);
      }
    if (localObject != null)
      paramXMLableReader.readXMLObject((XMLReadable)localObject);
    return ((SubmitJob)localObject);
  }

  public static JavaScript readJavaScript(XMLableReader paramXMLableReader)
  {
    String str = paramXMLableReader.getAttr("class");
    if (str == null)
      return null;
    if (str.endsWith(".WebHyperlink"))
    {
      localObject = new WebHyperlink();
      paramXMLableReader.readXMLObject((XMLReadable)localObject);
      return localObject;
    }
    if (str.endsWith(".EmailHyperlink"))
    {
      localObject = new EmailHyperlink();
      paramXMLableReader.readXMLObject((XMLReadable)localObject);
      return localObject;
    }
    if (str.endsWith(".ReportletHyperlink"))
    {
      localObject = new ReportletHyperlink();
      paramXMLableReader.readXMLObject((XMLReadable)localObject);
      return localObject;
    }
    Object localObject = null;
    try
    {
      localObject = (JavaScript)FRCoreContext.classForName(str).newInstance();
      paramXMLableReader.readXMLObject((XMLReadable)localObject);
    }
    catch (Exception localException)
    {
      FRContext.getLogger().log(Level.WARNING, localException.getMessage(), localException);
    }
    return ((JavaScript)localObject);
  }

  public static ChartData readChartData(XMLableReader paramXMLableReader)
  {
    Object localObject = null;
    String str = paramXMLableReader.getTagName();
    if (str.equals("ReportChartData"))
      localObject = (ReportChartData)paramXMLableReader.readXMLObject(new ReportChartData());
    else if (str.equals("TableChartData"))
      localObject = (TableChartData)paramXMLableReader.readXMLObject(new TableChartData());
    else if (str.equals("TopChartData"))
      localObject = (TopChartData)paramXMLableReader.readXMLObject(new TopChartData());
    return ((ChartData)localObject);
  }

  public static FilterDefinition readDefinition(XMLableReader paramXMLableReader)
  {
    Object localObject = null;
    String str = paramXMLableReader.getTagName();
    if ("OneValueCDDefinition".equals(str))
      localObject = new OneValueCDDefinition();
    else if ("MoreNameCDDefinition".equals(str))
      localObject = new MoreNameCDDefinition();
    else if ("ReportDataDefinition".equals(str))
      localObject = new com.fr.data.core.define.ReportDataDefinition();
    else if ("SeriesListDefinition".equals(str))
      return seriesListRead2ReportDefinition(paramXMLableReader, new com.fr.data.core.define.ReportDataDefinition());
    paramXMLableReader.readXMLObject((XMLReadable)localObject);
    return ((FilterDefinition)localObject);
  }

  private static FilterDefinition seriesListRead2ReportDefinition(XMLableReader paramXMLableReader, com.fr.data.core.define.ReportDataDefinition paramReportDataDefinition)
  {
    paramXMLableReader.readXMLObject(new XMLReadable(paramReportDataDefinition)
    {
      private final com.fr.data.core.define.ReportDataDefinition val$definition;

      public void readXML(XMLableReader paramXMLableReader)
      {
        if (paramXMLableReader.isChildNode())
        {
          String str1 = paramXMLableReader.getTagName();
          if (str1.equals("Top"))
          {
            String str2;
            if ((str2 = paramXMLableReader.getAttr("topCate")) != null)
              this.val$definition.setTopCate(Integer.parseInt(str2));
            if ((str2 = paramXMLableReader.getAttr("topValue")) != null)
              this.val$definition.setTopValue(Integer.parseInt(str2));
          }
          if ("CategoryList".equals(str1))
            paramXMLableReader.readXMLObject(new ReportXMLUtils.2(this));
          else if ("SeriesList".equals(str1))
            paramXMLableReader.readXMLObject(new ReportXMLUtils.3(this));
        }
      }

      static com.fr.data.core.define.ReportDataDefinition access$000(1 param1)
      {
        return param1.val$definition;
      }
    });
    return paramReportDataDefinition;
  }

  public static void writeShape(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter, Shape paramShape)
  {
    Object localObject;
    if (paramShape == null)
      return;
    if (paramShape instanceof GeneralPath)
    {
      localObject = (GeneralPath)paramShape;
      writeGeneralPath(paramXMLPrintWriter, (GeneralPath)localObject);
    }
    else if (paramShape instanceof Rectangle2D)
    {
      localObject = (Rectangle2D)paramShape;
      writeRectangle2D(paramXMLPrintWriter, (Rectangle2D)localObject);
    }
    else if (paramShape instanceof Arc2D)
    {
      localObject = (Arc2D)paramShape;
      writeArc2D(paramXMLPrintWriter, (Arc2D)localObject);
    }
    else if (paramShape instanceof Cylinder)
    {
      localObject = (Cylinder)paramShape;
      ((Cylinder)localObject).writeXML(paramXMLPrintWriter);
    }
  }

  public static Shape readShape(XMLableReader paramXMLableReader)
  {
    Object localObject = null;
    String str = paramXMLableReader.getTagName();
    if (str.equals("Rectangle2D"))
      localObject = readRectangle2D(paramXMLableReader);
    else if (str.equals("Arc2D"))
      localObject = readArc2D(paramXMLableReader);
    else if (str.equals("Cyliner"))
      localObject = (Shape)paramXMLableReader.readXMLObject(new Cylinder());
    else if (str.equals("GeneralPath"))
      localObject = readGeneralPath(paramXMLableReader);
    return ((Shape)localObject);
  }

  public static void writeRectangularShape(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter, RectangularShape paramRectangularShape)
  {
    if (paramRectangularShape instanceof Arc2D)
      writeArc2D(paramXMLPrintWriter, (Arc2D)paramRectangularShape);
    else if (paramRectangularShape instanceof RoundRectangle2D)
      writeRoundRectangle2D(paramXMLPrintWriter, (RoundRectangle2D)paramRectangularShape);
    else if (paramRectangularShape instanceof Rectangle2D)
      writeRectangle2D(paramXMLPrintWriter, (Rectangle2D)paramRectangularShape);
  }

  public static RectangularShape readRectangularShape(XMLableReader paramXMLableReader)
  {
    Object localObject = null;
    String str = paramXMLableReader.getTagName();
    if (str.equals("Rectangle2D"))
      localObject = readRectangle2D(paramXMLableReader);
    else if (str.equals("Arc2D"))
      localObject = readArc2D(paramXMLableReader);
    else if (str.equals("RoundRectangle"))
      localObject = readRoundRectangle2D(paramXMLableReader);
    return ((RectangularShape)localObject);
  }

  public static RoundRectangle2D readRoundRectangle2D(XMLableReader paramXMLableReader)
  {
    String str;
    Object localObject = null;
    if ((str = paramXMLableReader.getAttr("type")) != null)
      if (str.equals("float"))
        localObject = new RoundRectangle2D.Float(Float.valueOf(paramXMLableReader.getAttr("x")).floatValue(), Float.valueOf(paramXMLableReader.getAttr("y")).floatValue(), Float.valueOf(paramXMLableReader.getAttr("width")).floatValue(), Float.valueOf(paramXMLableReader.getAttr("height")).floatValue(), Float.valueOf(paramXMLableReader.getAttr("arcWidth")).floatValue(), Float.valueOf(paramXMLableReader.getAttr("arcHeight")).floatValue());
      else
        localObject = new RoundRectangle2D.Double(java.lang.Double.valueOf(paramXMLableReader.getAttr("x")).doubleValue(), java.lang.Double.valueOf(paramXMLableReader.getAttr("y")).doubleValue(), java.lang.Double.valueOf(paramXMLableReader.getAttr("width")).doubleValue(), java.lang.Double.valueOf(paramXMLableReader.getAttr("height")).doubleValue(), java.lang.Double.valueOf(paramXMLableReader.getAttr("arcWidth")).doubleValue(), java.lang.Double.valueOf(paramXMLableReader.getAttr("arcHeight")).doubleValue());
    return ((RoundRectangle2D)localObject);
  }

  public static void writeRoundRectangle2D(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter, RoundRectangle2D paramRoundRectangle2D)
  {
    paramXMLPrintWriter.startTAG("RoundRectangle2D");
    if (paramRoundRectangle2D instanceof RoundRectangle2D.Double)
      paramXMLPrintWriter.attr("type", "double");
    else if (paramRoundRectangle2D instanceof RoundRectangle2D.Float)
      paramXMLPrintWriter.attr("type", "float");
    paramXMLPrintWriter.attr("x", paramRoundRectangle2D.getX()).attr("y", paramRoundRectangle2D.getY()).attr("width", paramRoundRectangle2D.getWidth()).attr("height", paramRoundRectangle2D.getHeight()).attr("arcWidth", paramRoundRectangle2D.getArcWidth()).attr("arcHeight", paramRoundRectangle2D.getArcHeight()).end();
  }

  public static Glyph readGlyph(XMLableReader paramXMLableReader)
  {
    Object localObject = null;
    String str = paramXMLableReader.getTagName();
    if (str.equals("Cubic"))
      localObject = (Cubic)paramXMLableReader.readXMLObject(new Cubic());
    else if (str.equals("TextGlyph"))
      localObject = (TextGlyph)paramXMLableReader.readXMLObject(new TextGlyph());
    else if (str.equals("LineGlyph"))
      localObject = (LineGlyph)paramXMLableReader.readXMLObject(new LineGlyph());
    else if (str.equals("ValueAxisGlyph"))
      localObject = (ValueAxisGlyph)paramXMLableReader.readXMLObject(new ValueAxisGlyph());
    else if (str.equals("CategoryAxisGlyph"))
      localObject = (CategoryAxisGlyph)paramXMLableReader.readXMLObject(new CategoryAxisGlyph());
    else if (str.equals("RadarAxisGlyph"))
      localObject = (RadarAxisGlyph)paramXMLableReader.readXMLObject(new RadarAxisGlyph());
    else if (str.equals("ValueAxis3DGlyph"))
      localObject = (ValueAxis3DGlyph)paramXMLableReader.readXMLObject(new ValueAxis3DGlyph());
    else if (str.equals("CategoryAxis3DGlyph"))
      localObject = (CategoryAxis3DGlyph)paramXMLableReader.readXMLObject(new CategoryAxis3DGlyph());
    else if (str.equals("ShapeGlyph"))
      localObject = (ShapeGlyph)paramXMLableReader.readXMLObject(new ShapeGlyph());
    else if (str.equals("Area3D"))
      localObject = (Area3D)paramXMLableReader.readXMLObject(new Area3D());
    else if (str.equals("ShapeGlyph"))
      localObject = (ShapeGlyph)paramXMLableReader.readXMLObject(new ShapeGlyph());
    else if (str.equals("FoldLine3D"))
      localObject = (FoldLine3D)paramXMLableReader.readXMLObject(new FoldLine3D());
    else if (str.equals("FoldLine"))
      localObject = (FoldLine)paramXMLableReader.readXMLObject(new FoldLine());
    else if (str.equals("Pie3D"))
      localObject = (Pie3D)paramXMLableReader.readXMLObject(new Pie3D());
    else if (str.equals("CompositeGlyph"))
      localObject = (CompositeGlyph)paramXMLableReader.readXMLObject(new CompositeGlyph());
    return ((Glyph)localObject);
  }

  public static Highlight readHighlight(XMLableReader paramXMLableReader)
  {
    String str;
    Object localObject = null;
    if ((str = paramXMLableReader.getAttr("class")) != null)
      if ((str.endsWith(".DefaultHighlight")) || (str.endsWith(".CellHighlight")))
        localObject = new DefaultHighlight();
      else
        try
        {
          localObject = (Highlight)FRCoreContext.classForName(str).newInstance();
        }
        catch (Exception localException)
        {
          FRContext.getLogger().log(Level.WARNING, localException.getMessage(), localException);
        }
    if (localObject == null)
      return localObject;
    paramXMLableReader.readXMLObject((XMLReadable)localObject);
    return ((Highlight)localObject);
  }

  public static HighlightAction readHighlightAction(XMLableReader paramXMLableReader)
  {
    Object localObject = null;
    String str = paramXMLableReader.getAttr("class");
    if (str == null)
      return localObject;
    if ((str.endsWith(".ValueHighlightAction")) || (str.endsWith(".NewValueHighlightAction")))
      localObject = new ValueHighlightAction();
    else if (str.endsWith(".PresentHighlightAction"))
      localObject = new PresentHighlightAction();
    else if (str.endsWith(".ForegroundHighlightAction"))
      localObject = new ForegroundHighlightAction();
    else if (str.endsWith(".BackgroundHighlightAction"))
      localObject = new BackgroundHighlightAction();
    else if (str.endsWith(".RowHeightHighlightAction"))
      localObject = new RowHeightHighlightAction();
    else if (str.endsWith(".ColWidthHighlightAction"))
      localObject = new ColWidthHighlightAction();
    else if (str.endsWith(".PageHighlightAction"))
      localObject = new PageHighlightAction();
    else if (str.endsWith(".PaddingHighlightAction"))
      localObject = new PaddingHighlightAction();
    else if (str.endsWith(".FRFontHighlightAction"))
      localObject = new FRFontHighlightAction();
    else if (str.endsWith(".HyperlinkHighlightAction"))
      localObject = new HyperlinkHighlightAction();
    else if (str.endsWith(".BorderHighlightAction"))
      localObject = new BorderHighlightAction();
    else if (str.endsWith(".WidgetHighlightAction"))
      localObject = new WidgetHighlightAction();
    else
      try
      {
        localObject = (HighlightAction)FRCoreContext.classForName(str).newInstance();
      }
      catch (InstantiationException localInstantiationException)
      {
        FRContext.getLogger().log(Level.WARNING, localInstantiationException.getMessage(), localInstantiationException);
      }
      catch (IllegalAccessException localIllegalAccessException)
      {
        FRContext.getLogger().log(Level.WARNING, localIllegalAccessException.getMessage(), localIllegalAccessException);
      }
      catch (ClassNotFoundException localClassNotFoundException)
      {
        FRContext.getLogger().log(Level.WARNING, localClassNotFoundException.getMessage(), localClassNotFoundException);
      }
    if (localObject != null)
      paramXMLableReader.readXMLObject((XMLReadable)localObject);
    return ((HighlightAction)localObject);
  }

  public static void writeCellElement(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter, CellElement paramCellElement)
  {
    if (paramCellElement == null)
      return;
    paramXMLPrintWriter.startTAG("C").attr("c", paramCellElement.getColumn()).attr("r", paramCellElement.getRow());
    if (paramCellElement.getColumnSpan() != 1)
      paramXMLPrintWriter.attr("cs", paramCellElement.getColumnSpan());
    if (paramCellElement.getRowSpan() != 1)
      paramXMLPrintWriter.attr("rs", paramCellElement.getRowSpan());
    if ((paramCellElement.getStyle() != null) && (!(ComparatorUtils.equals(paramCellElement.getStyle(), Style.DEFAULT_STYLE))))
    {
      SynchronizedStyleList localSynchronizedStyleList = SynchronizedStyleList.getSynchronizedStyleList(Thread.currentThread());
      paramXMLPrintWriter.attr("s", localSynchronizedStyleList.indexOfStyle(paramCellElement.getStyle()));
    }
    paramCellElement.writeXML(paramXMLPrintWriter);
    paramXMLPrintWriter.end();
  }

  public static void writeObject(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter, Object paramObject)
  {
    if (paramObject == null)
      return;
    ObjectXMLWriter localObjectXMLWriter = as(paramObject);
    String str1 = localObjectXMLWriter.type();
    String str2 = localObjectXMLWriter.className();
    paramXMLPrintWriter.startTAG("O");
    if (StringUtils.isNotBlank(str1))
      paramXMLPrintWriter.attr("t", str1);
    if (StringUtils.isNotBlank(str2))
      paramXMLPrintWriter.attr("class", str2);
    localObjectXMLWriter.writeXML(paramXMLPrintWriter);
    paramXMLPrintWriter.end();
  }

  private static ObjectXMLWriter as(Object paramObject)
  {
    if ((paramObject == null) || (paramObject == Primitive.NULL))
      return new NULL(null);
    if (paramObject instanceof Boolean)
      return new BOOLEAN((Boolean)paramObject);
    if (paramObject instanceof Integer)
      return new INTEGER((Integer)paramObject);
    if (paramObject instanceof java.lang.Double)
      return new DOUBLE((java.lang.Double)paramObject);
    if (paramObject instanceof Float)
      return new FLOAT((Float)paramObject);
    if (paramObject instanceof BigInteger)
      return new BIGI((BigInteger)paramObject);
    if (paramObject instanceof BigDecimal)
      return new BIGD((BigDecimal)paramObject);
    if (paramObject instanceof Date)
      return new DATE((Date)paramObject);
    if (paramObject instanceof Image)
      return new IMAGE((Image)paramObject);
    if (paramObject instanceof FArray)
      return new FARRAYXML((FArray)paramObject);
    if (paramObject instanceof Formula)
      return new FORMULA((Formula)paramObject);
    if (paramObject instanceof ChartCollection)
      return new CC((ChartCollection)paramObject);
    if (paramObject instanceof ChartPainter)
      return new CP((ChartPainter)paramObject);
    if (paramObject instanceof BiasTextPainter)
      return new BTP((BiasTextPainter)paramObject);
    if (paramObject instanceof Parameter)
      return new PARA((Parameter)paramObject);
    if (paramObject instanceof DSColumn)
      return new DSCOLUMN((DSColumn)paramObject);
    if (paramObject instanceof SubReport)
      return new SUBREPORT((SubReport)paramObject);
    if (paramObject instanceof ResultSubReport)
      return new RESULTSUBREPORT((ResultSubReport)paramObject);
    if (paramObject instanceof ShapePainter)
      return new SP((ShapePainter)paramObject);
    if (paramObject instanceof Report)
      return new REPORT((Report)paramObject);
    if (paramObject instanceof TableColumn)
      return new TABLECOLUMN((TableColumn)paramObject);
    return new ElseAsString(paramObject);
  }

  public static Object readObject(XMLableReader paramXMLableReader)
  {
    return readObject(paramXMLableReader, false, null);
  }

  public static String elementValue(XMLableReader paramXMLableReader)
  {
    String str = paramXMLableReader.getElementValue();
    if (str == null)
      str = "";
    str = str.replaceAll("\\n", "");
    return str;
  }

  public static Object readObject(XMLableReader paramXMLableReader, boolean paramBoolean, CellElement paramCellElement)
  {
    String str1;
    Object localObject2;
    Object localObject1 = "String";
    if ((str1 = paramXMLableReader.getAttr("t")) != null)
      localObject1 = str1;
    else if ((str1 = paramXMLableReader.getAttr("type")) != null)
      localObject1 = str1;
    if ("NULL".equals(localObject1))
      return Primitive.NULL;
    if ((StringUtils.isBlank((String)localObject1)) || ("S".equals(localObject1)) || ("String".equals(localObject1)))
    {
      String str2 = "";
      try
      {
        str2 = BaseCoreUtils.readESC(elementValue(paramXMLableReader));
      }
      catch (Exception localException1)
      {
        FRContext.getLogger().log(Level.INFO, localException1.getMessage(), localException1);
      }
      if ((paramBoolean) && (str2 != null) && (str2.startsWith("=")))
        return new Formula(str2);
      return str2;
    }
    if (("D".equals(localObject1)) || ("Double".equals(localObject1)))
      try
      {
        return java.lang.Double.valueOf(elementValue(paramXMLableReader));
      }
      catch (NumberFormatException localNumberFormatException)
      {
        FRContext.getLogger().log(Level.INFO, localNumberFormatException.getMessage(), localNumberFormatException);
        return new java.lang.Double(0.0D);
      }
    if (("B".equals(localObject1)) || ("Boolean".equals(localObject1)))
      return Boolean.valueOf(elementValue(paramXMLableReader));
    if (("I".equals(localObject1)) || ("Inteter".equals(localObject1)))
      return Integer.valueOf(elementValue(paramXMLableReader));
    if (("F".equals(localObject1)) || ("Float".equals(localObject1)))
      return Float.valueOf(elementValue(paramXMLableReader));
    if ("BigInteger".equals(localObject1))
      return new BigInteger(elementValue(paramXMLableReader));
    if ("BigDecimal".equals(localObject1))
      return new BigDecimal(elementValue(paramXMLableReader));
    if ("Date".equals(localObject1))
      return DateUtils.object2Date(elementValue(paramXMLableReader), true);
    if ("FARRAY".equals(localObject1))
      return paramXMLableReader.readXMLObject(new FArray());
    if ("Formula".equals(localObject1))
    {
      String str3 = paramXMLableReader.getAttr("class");
      if ((str3 == null) || ("Formula".equals(str3)))
        localObject2 = new Formula();
      else
        try
        {
          localObject2 = (Formula)FRCoreContext.classForName(str1).newInstance();
        }
        catch (Exception localException4)
        {
          localObject2 = new Formula();
          FRContext.getLogger().log(Level.WARNING, localException4.getMessage(), localException4);
        }
      paramXMLableReader.readXMLObject((XMLReadable)localObject2);
      return localObject2;
    }
    if ("Image".equals(localObject1))
    {
      localObject2 = new XMLObject(null)
      {
        public void readXML(XMLableReader paramXMLableReader)
        {
          if ((paramXMLableReader.isChildNode()) && (paramXMLableReader.getTagName().equals("Image")))
            this.obj = BaseXMLUtils.readImage(paramXMLableReader);
        }
      };
      paramXMLableReader.readXMLObject((XMLReadable)localObject2);
      return ((XMLObject)localObject2).getObject();
    }
    if ("CC".equals(localObject1))
    {
      localObject2 = new ChartCollection();
      paramXMLableReader.readXMLObject((XMLReadable)localObject2);
      return localObject2;
    }
    if (("Chart".equals(localObject1)) || ("BindChart".equals(localObject1)) || ("ReportDataChart".equals(localObject1)) || ("ChartPainter".equals(localObject1)))
      return ChartXMLCompatibleUtils.read62ChartCollection(paramXMLableReader);
    if ("CP".equals(localObject1))
    {
      localObject2 = new ChartPainter();
      paramXMLableReader.readXMLObject((XMLReadable)localObject2);
      return localObject2;
    }
    if ("BiasTextPainter".equals(localObject1))
    {
      localObject2 = new BiasTextPainter("");
      paramXMLableReader.readXMLObject((XMLReadable)localObject2);
      return localObject2;
    }
    if ("Parameter".equals(localObject1))
      return readParameter(paramXMLableReader);
    if (("DSColumn".equals(localObject1)) || (((String)localObject1).equals("LinearDSColumn")) || (((String)localObject1).equals("ComplexDSColumn")))
    {
      localObject2 = new DSColumn();
      paramXMLableReader.readXMLObject((XMLReadable)localObject2);
      return localObject2;
    }
    if ("SubReport".equals(localObject1))
    {
      localObject2 = new SubReport();
      paramXMLableReader.readXMLObject((XMLReadable)localObject2);
      return localObject2;
    }
    if ("ResultSubReport".equals(localObject1))
    {
      localObject2 = new ResultSubReport();
      paramXMLableReader.readXMLObject((XMLReadable)localObject2);
      return localObject2;
    }
    if ("TableColumn".equals(localObject1))
    {
      localObject2 = new TableColumn();
      paramXMLableReader.readXMLObject((XMLReadable)localObject2);
      return localObject2;
    }
    if ("ShapePainter".equals(localObject1))
    {
      localObject2 = null;
      if ((str1 = paramXMLableReader.getAttr("class")) != null)
        try
        {
          localObject2 = (ShapePainter)FRCoreContext.classForName(str1).newInstance();
        }
        catch (Exception localException2)
        {
          localObject2 = new RectangleShapePainter();
          FRContext.getLogger().log(Level.WARNING, localException2.getMessage(), localException2);
        }
      paramXMLableReader.readXMLObject((XMLReadable)localObject2);
      return localObject2;
    }
    if ("Report".equals(localObject1))
    {
      localObject2 = null;
      if ((str1 = paramXMLableReader.getAttr("class")) != null)
        try
        {
          localObject2 = (Report)FRCoreContext.classForName(str1).newInstance();
        }
        catch (Exception localException3)
        {
          localObject2 = new WorkSheet();
          FRContext.getLogger().log(Level.WARNING, localException3.getMessage(), localException3);
        }
      paramXMLableReader.readXMLObject((XMLReadable)localObject2);
      return localObject2;
    }
    if ("Attachment".equals(localObject1))
      return AttachmentService.getAttachment(elementValue(paramXMLableReader));
    if ("PB".equals(localObject1))
      return readOldPBElement(paramXMLableReader);
    if ("PE".equals(localObject1))
      return readOldPEElement(paramXMLableReader);
    if ("PR".equals(localObject1))
    {
      localObject2 = new XMLObject(null)
      {
        public void readXML(XMLableReader paramXMLableReader)
        {
          if ((paramXMLableReader.isChildNode()) && (paramXMLableReader.getTagName().equals("ParameterRef")))
          {
            String str;
            if ((str = paramXMLableReader.getAttr("name")) != null)
              this.obj = SynchronizedNameWidget.get(str);
          }
        }
      };
      paramXMLableReader.readXMLObject((XMLReadable)localObject2);
      return ((XMLObject)localObject2).getObject();
    }
    return null;
  }

  public static Button readOldPBElement(XMLableReader paramXMLableReader)
  {
    ArrayList localArrayList = new ArrayList();
    paramXMLableReader.readXMLObject(new XMLReadable(localArrayList)
    {
      private final java.util.List val$list;

      public void readXML(XMLableReader paramXMLableReader)
      {
        if ((paramXMLableReader.isChildNode()) && (paramXMLableReader.getTagName().equals("ParameterButton")))
        {
          String str;
          if (StringUtils.isNotBlank(str = paramXMLableReader.getAttr("type")))
            if (str.equals("0"))
              this.val$list.add(new FormSubmitButton(paramXMLableReader.getAttr("name")));
            else if (str.equals("1"))
              this.val$list.add(new FormResetButton(paramXMLableReader.getAttr("name")));
        }
      }
    });
    return ((localArrayList.size() > 0) ? (Button)localArrayList.get(0) : null);
  }

  public static FieldEditor readOldPEElement(XMLableReader paramXMLableReader)
  {
    ArrayList localArrayList = new ArrayList();
    paramXMLableReader.readXMLObject(new XMLReadable(localArrayList)
    {
      private final java.util.List val$list;

      public void readXML(XMLableReader paramXMLableReader)
      {
        if ((paramXMLableReader.isChildNode()) && (paramXMLableReader.getTagName().equals("ParameterEditor")))
        {
          ReportXMLUtils.ParameterEditor localParameterEditor = new ReportXMLUtils.ParameterEditor();
          paramXMLableReader.readXMLObject(localParameterEditor);
          this.val$list.add(localParameterEditor);
        }
      }
    });
    return ((localArrayList.size() > 0) ? ((ParameterEditor)localArrayList.get(0)).toFieldEditor() : null);
  }

  public static void writeIndexStyle(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter, Style paramStyle)
  {
    if (paramStyle == null)
      return;
    SynchronizedStyleList localSynchronizedStyleList = SynchronizedStyleList.getSynchronizedStyleList(Thread.currentThread());
    paramXMLPrintWriter.startTAG("Style").attr("index", localSynchronizedStyleList.indexOfStyle(paramStyle)).end();
  }

  public static Style readFullStyle(XMLableReader paramXMLableReader)
  {
    String str;
    8 local8;
    if ((str = paramXMLableReader.getAttr("style_name")) != null)
      return NameStyle.getInstance(str);
    Style localStyle = Style.getInstance();
    if ((str = paramXMLableReader.getAttr("horizontal_alignment")) != null)
    {
      int i = Integer.parseInt(str);
      if (i == 5)
        i = 2;
      localStyle = localStyle.deriveHorizontalAlignment(i);
    }
    if ((str = paramXMLableReader.getAttr("vertical_alignment")) != null)
      localStyle = localStyle.deriveVerticalAlignment(Integer.parseInt(str));
    if ((str = paramXMLableReader.getAttr("isWrapText")) != null)
      if (Boolean.valueOf(str).booleanValue())
        localStyle = localStyle.deriveTextStyle(0);
      else
        localStyle = localStyle.deriveTextStyle(1);
    if ((str = paramXMLableReader.getAttr("textStyle")) != null)
      localStyle = localStyle.deriveTextStyle(Integer.parseInt(str));
    if ((str = paramXMLableReader.getAttr("isVerticalText")) != null)
      localStyle = localStyle.deriveVerticalText(Integer.parseInt(str));
    if ((str = paramXMLableReader.getAttr("textDirection")) != null)
      localStyle = localStyle.deriveTextDirection(Integer.parseInt(str));
    if ((str = paramXMLableReader.getAttr("rotation")) != null)
      localStyle = localStyle.deriveRotation(Integer.parseInt(str));
    if ((str = paramXMLableReader.getAttr("imageLayout")) != null)
      localStyle = localStyle.deriveImageLayout(Integer.parseInt(str));
    if ((str = paramXMLableReader.getAttr("paddingLeft")) == null)
      if ((str = paramXMLableReader.getAttr("leftIndent")) == null)
        break label247;
    localStyle = localStyle.derivePaddingLeft(Integer.parseInt(str));
    if ((str = paramXMLableReader.getAttr("paddingRight")) == null)
      label247: if ((str = paramXMLableReader.getAttr("rightIndent")) == null)
        break label280;
    localStyle = localStyle.derivePaddingRight(Integer.parseInt(str));
    if ((str = paramXMLableReader.getAttr("spacingBefore")) != null)
      label280: localStyle = localStyle.deriveSpacingBefore(Integer.parseInt(str));
    if ((str = paramXMLableReader.getAttr("spacingAfter")) != null)
      localStyle = localStyle.deriveSpacingAfter(Integer.parseInt(str));
    if ((str = paramXMLableReader.getAttr("lineSpacing")) != null)
      localStyle = localStyle.deriveLineSpacing(Integer.parseInt(str));
    paramXMLableReader.readXMLObject(local8 = new XMLObject(localStyle)
    {
      public void readXML(XMLableReader paramXMLableReader)
      {
        if (paramXMLableReader.isChildNode())
        {
          String str = paramXMLableReader.getTagName();
          if (str.equals("Format"))
          {
            this.obj = ((Style)this.obj).deriveFormat(ReportXMLUtils.readFormat(paramXMLableReader));
          }
          else if (BaseXMLUtils.isFRFontTagName(str))
          {
            this.obj = ((Style)this.obj).deriveFRFont(BaseXMLUtils.readFRFont(paramXMLableReader));
          }
          else if (str.equals("Background"))
          {
            this.obj = ((Style)this.obj).deriveBackground(BaseXMLUtils.readBackground(paramXMLableReader));
          }
          else if (str.equals("Border"))
          {
            ReportXMLUtils.9 local9;
            paramXMLableReader.readXMLObject(local9 = new ReportXMLUtils.9(this, this.obj));
            this.obj = local9.getObject();
          }
        }
      }
    });
    return ((Style)local8.getObject());
  }

  public static void writeStyle(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter, Style paramStyle)
  {
    if (paramStyle instanceof NameStyle)
    {
      paramXMLPrintWriter.startTAG("Style").attr("style_name", ((NameStyle)paramStyle).getName()).end();
      return;
    }
    paramXMLPrintWriter.startTAG("Style");
    if (paramStyle.getHorizontalAlignment() != 2)
      paramXMLPrintWriter.attr("horizontal_alignment", paramStyle.getHorizontalAlignment());
    if (paramStyle.getVerticalAlignment() != 0)
      paramXMLPrintWriter.attr("vertical_alignment", paramStyle.getVerticalAlignment());
    if (paramStyle.getTextStyle() != 0)
      paramXMLPrintWriter.attr("textStyle", paramStyle.getTextStyle());
    if (paramStyle.getVerticalText() != 0)
      paramXMLPrintWriter.attr("isVerticalText", paramStyle.getVerticalText()).attr("textDirection", paramStyle.getTextDirection());
    if (paramStyle.getRotation() != 0)
      paramXMLPrintWriter.attr("rotation", paramStyle.getRotation());
    if (paramStyle.getImageLayout() != 3)
      paramXMLPrintWriter.attr("imageLayout", paramStyle.getImageLayout());
    if (paramStyle.getPaddingLeft() != 2)
      paramXMLPrintWriter.attr("paddingLeft", paramStyle.getPaddingLeft());
    if (paramStyle.getPaddingRight() != 2)
      paramXMLPrintWriter.attr("paddingRight", paramStyle.getPaddingRight());
    if (paramStyle.getSpacingBefore() != 0)
      paramXMLPrintWriter.attr("spacingBefore", paramStyle.getSpacingBefore());
    if (paramStyle.getSpacingAfter() != 0)
      paramXMLPrintWriter.attr("spacingAfter", paramStyle.getSpacingAfter());
    if (paramStyle.getLineSpacing() != 0)
      paramXMLPrintWriter.attr("lineSpacing", paramStyle.getLineSpacing());
    if (paramStyle.getFormat() != null)
      writeFormat(paramXMLPrintWriter, paramStyle.getFormat());
    if (paramStyle.getFRFont() != null)
      BaseXMLUtils.writeFRFont(paramXMLPrintWriter, paramStyle.getFRFont());
    BaseXMLUtils.writeBackground(paramXMLPrintWriter, paramStyle.getBackground());
    paramXMLPrintWriter.startTAG("Border");
    if ((paramStyle.getBorderTop() != 0) || (paramStyle.getBorderTopColor() != Color.black))
    {
      paramXMLPrintWriter.startTAG("Top");
      if (paramStyle.getBorderTop() != 0)
        paramXMLPrintWriter.attr("style", paramStyle.getBorderTop());
      if (paramStyle.getBorderTopColor() != Color.black)
        paramXMLPrintWriter.attr("color", paramStyle.getBorderTopColor().getRGB());
      paramXMLPrintWriter.end();
    }
    if ((paramStyle.getBorderBottom() != 0) || (paramStyle.getBorderBottomColor() != Color.black))
    {
      paramXMLPrintWriter.startTAG("Bottom");
      if (paramStyle.getBorderBottom() != 0)
        paramXMLPrintWriter.attr("style", paramStyle.getBorderBottom());
      if (paramStyle.getBorderBottomColor() != Color.black)
        paramXMLPrintWriter.attr("color", paramStyle.getBorderBottomColor().getRGB());
      paramXMLPrintWriter.end();
    }
    if ((paramStyle.getBorderLeft() != 0) || (paramStyle.getBorderLeftColor() != Color.black))
    {
      paramXMLPrintWriter.startTAG("Left");
      if (paramStyle.getBorderLeft() != 0)
        paramXMLPrintWriter.attr("style", paramStyle.getBorderLeft());
      if (paramStyle.getBorderLeftColor() != Color.black)
        paramXMLPrintWriter.attr("color", paramStyle.getBorderLeftColor().getRGB());
      paramXMLPrintWriter.end();
    }
    if ((paramStyle.getBorderRight() != 0) || (paramStyle.getBorderRightColor() != Color.black))
    {
      paramXMLPrintWriter.startTAG("Right");
      if (paramStyle.getBorderRight() != 0)
        paramXMLPrintWriter.attr("style", paramStyle.getBorderRight());
      if (paramStyle.getBorderRightColor() != Color.black)
        paramXMLPrintWriter.attr("color", paramStyle.getBorderRightColor().getRGB());
      paramXMLPrintWriter.end();
    }
    paramXMLPrintWriter.end().end();
  }

  public static void writeFloatElement(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter, FloatElement paramFloatElement)
  {
    if (paramFloatElement == null)
      return;
    paramXMLPrintWriter.startTAG(paramFloatElement.getClass().getName());
    paramFloatElement.writeXML(paramXMLPrintWriter);
    paramXMLPrintWriter.end();
  }

  public static void readReportFloatElementList(XMLableReader paramXMLableReader, Report paramReport)
  {
    paramXMLableReader.readXMLObject(new XMLReadable(paramReport)
    {
      private final Report val$report;

      public void readXML(XMLableReader paramXMLableReader)
      {
        if (paramXMLableReader.isChildNode())
        {
          String str = paramXMLableReader.getTagName();
          Object localObject1 = null;
          if (str.equals("ShapeFloatElement"))
            if ((localObject2 = paramXMLableReader.getAttr("class")) != null)
              if (((String)localObject2).endsWith(".IssoscelesTriangleShapeFloatElement"))
                localObject1 = new IssoscelesTriangleShapePainter();
              else if (((String)localObject2).endsWith(".LineShapeFloatElement"))
                localObject1 = new com.fr.report.painter.shape.LineShapePainter();
              else if (((String)localObject2).endsWith(".OvalShapeFloatElement"))
                localObject1 = new OvalShapePainter();
              else if (((String)localObject2).endsWith(".RectangleShapeFloatElement"))
                localObject1 = new RectangleShapePainter();
              else if (((String)localObject2).endsWith(".RoundedRectangleShapeFloatElement"))
                localObject1 = new com.fr.report.painter.shape.RoundedRectangleShapePainter();
          else if (str.equals("TextBoxFloatElement"))
            localObject1 = "";
          else if (str.equals("ImageFloatElement"))
            localObject1 = ((XMLObject)paramXMLableReader.readXMLObject(new ReportXMLUtils.11(this, null))).getObject();
          if ((localObject1 != null) && (localObject1 instanceof Painter))
            paramXMLableReader.readXMLObject((Painter)localObject1);
          Object localObject2 = new FloatElement();
          ((FloatElement)localObject2).setValue(localObject1);
          paramXMLableReader.readXMLObject((XMLReadable)localObject2);
          this.val$report.addFloatElement((FloatElement)localObject2);
        }
      }
    });
  }

  public static void writeParameter(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter, Parameter paramParameter)
  {
    if (paramParameter == null)
      return;
    paramXMLPrintWriter.startTAG("Parameter");
    paramParameter.writeXML(paramXMLPrintWriter);
    paramXMLPrintWriter.end();
  }

  public static Parameter[] readParameters(XMLableReader paramXMLableReader)
  {
    ArrayList localArrayList = new ArrayList();
    paramXMLableReader.readXMLObject(new XMLReadable(localArrayList)
    {
      private final java.util.List val$parameterList;

      public void readXML(XMLableReader paramXMLableReader)
      {
        if ((paramXMLableReader.isChildNode()) && (paramXMLableReader.getTagName().equals("Parameter")))
          this.val$parameterList.add(ReportXMLUtils.readParameter(paramXMLableReader));
      }
    });
    return ((Parameter[])localArrayList.toArray(new Parameter[localArrayList.size()]));
  }

  public static Parameter readParameter(XMLableReader paramXMLableReader)
  {
    Parameter localParameter = new Parameter();
    paramXMLableReader.readXMLObject(localParameter);
    return localParameter;
  }

  public static void writeParameters(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter, Parameter[] paramArrayOfParameter)
  {
    paramXMLPrintWriter.startTAG("Parameters");
    int i = 0;
    int j = (paramArrayOfParameter == null) ? 0 : paramArrayOfParameter.length;
    while (i < j)
    {
      writeParameter(paramXMLPrintWriter, paramArrayOfParameter[i]);
      ++i;
    }
    paramXMLPrintWriter.end();
  }

  public static ParameterUI readParameterUI(XMLableReader paramXMLableReader)
  {
    String str;
    Object localObject = null;
    if ((str = paramXMLableReader.getAttr("class")) != null)
      if ((str.endsWith(".DefaultParameterInterface")) || (str.endsWith(".DefaultParameterUI")))
        localObject = CustomParameterUI.createDefaultParameterUI();
      else if (str.endsWith(".CustomParameterInterface"))
        localObject = new CustomParameterUI();
      else if (str.endsWith(".CustomEmbeddedParameterInterface"))
        localObject = new CustomParameterUI();
      else
        try
        {
          localObject = (ParameterUI)FRCoreContext.classForName(str).newInstance();
        }
        catch (Exception localException)
        {
          FRContext.getLogger().log(Level.WARNING, localException.getMessage(), localException);
        }
    if (localObject != null)
      paramXMLableReader.readXMLObject((XMLReadable)localObject);
    return ((ParameterUI)localObject);
  }

  public static ParameterProcessor readParameterProcessor(XMLableReader paramXMLableReader)
  {
    String str;
    Object localObject = null;
    if ((str = paramXMLableReader.getAttr("class")) != null)
      if (str.endsWith(".ClassParameterProcessor"))
        localObject = new ClassParameterProcessor();
      else
        try
        {
          localObject = (ParameterProcessor)FRCoreContext.classForName(str).newInstance();
        }
        catch (Exception localException)
        {
          FRContext.getLogger().log(Level.WARNING, localException.getMessage(), localException);
        }
    if (localObject instanceof XMLable)
      paramXMLableReader.readXMLObject((XMLable)localObject);
    return ((ParameterProcessor)localObject);
  }

  public static void writeParameterProcessor(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter, ParameterProcessor paramParameterProcessor)
  {
    paramXMLPrintWriter.startTAG("PP").attr("class", paramParameterProcessor.getClass().getName());
    if (paramParameterProcessor instanceof XMLable)
      ((XMLable)paramParameterProcessor).writeXML(paramXMLPrintWriter);
    paramXMLPrintWriter.end();
  }

  public static UnitProcessor readUnitProcessor(XMLableReader paramXMLableReader)
  {
    String str;
    Object localObject = null;
    if ((str = paramXMLableReader.getAttr("class")) != null)
      if (str.endsWith(".SQLQueryUnitProcessor"))
        localObject = new SQLQueryUnitProcessor();
      else if (str.endsWith(".FormulaUnitProcessor"))
        localObject = new FormulaUnitProcessor();
      else
        try
        {
          localObject = (UnitProcessor)FRCoreContext.classForName(str).newInstance();
        }
        catch (Exception localException)
        {
          localObject = null;
        }
    if (localObject instanceof XMLable)
      paramXMLableReader.readXMLObject((XMLable)localObject);
    return ((UnitProcessor)localObject);
  }

  public static void writeUnitProcessor(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter, UnitProcessor paramUnitProcessor)
  {
    paramXMLPrintWriter.startTAG("UP").attr("class", paramUnitProcessor.getClass().getName());
    if (paramUnitProcessor instanceof XMLable)
      ((XMLable)paramUnitProcessor).writeXML(paramXMLPrintWriter);
    paramXMLPrintWriter.end();
  }

  public static FieldEditor readFieldEditor(XMLableReader paramXMLableReader)
  {
    Widget localWidget = readWidget(paramXMLableReader);
    return ((localWidget instanceof FieldEditor) ? (FieldEditor)localWidget : null);
  }

  public static Widget readCellWidget(XMLableReader paramXMLableReader)
  {
    Widget localWidget = readWidget(paramXMLableReader);
    return (((localWidget instanceof FieldEditor) || (localWidget instanceof com.fr.report.web.ui.CustomButton)) ? localWidget : null);
  }

  public static Widget readWidget(XMLableReader paramXMLableReader)
  {
    String str;
    Object localObject = null;
    if ((str = paramXMLableReader.getAttr("class")) != null)
    {
      if (str.endsWith(".TextCellEditorDef"))
      {
        localObject = new TextEditor();
      }
      else if (str.endsWith(".ComboBoxCellEditorDef"))
      {
        localObject = new ComboBox();
      }
      else if (str.endsWith(".CheckBoxCellEditorDef"))
      {
        localObject = new ComboCheckBox();
        ((ComboCheckBox)localObject).setReturnArray(false);
      }
      else if (str.endsWith(".DateCellEditorDef"))
      {
        localObject = new DateEditor();
      }
      else if (str.endsWith(".DateTimeEditorDef"))
      {
        localObject = new DateTimeEditor();
      }
      else if (str.endsWith(".FileCellEditorDef"))
      {
        localObject = new FileEditor();
      }
      else if (str.endsWith(".NumberCellEditorDef"))
      {
        localObject = new NumberEditor();
      }
      else if (str.endsWith(".CheckBoxEditor"))
      {
        localObject = new ComboCheckBox();
        ((ComboCheckBox)localObject).setReturnArray(false);
      }
      else
      {
        if (str.endsWith(".AppendRow"))
          return null;
        if (str.endsWith(".DeleteRow"))
          return null;
        try
        {
          Class localClass = FRCoreContext.classForName(str);
          localObject = (Widget)localClass.newInstance();
        }
        catch (Exception localException)
        {
          FRContext.getLogger().log(Level.WARNING, localException.getMessage(), localException);
        }
      }
      if (localObject != null)
        paramXMLableReader.readXMLObject((XMLReadable)localObject);
    }
    return ((Widget)localObject);
  }

  public static Formula readFormula(XMLableReader paramXMLableReader)
  {
    String str;
    Formula localFormula = null;
    if ((str = paramXMLableReader.getAttr("class")) != null)
      try
      {
        Class localClass = FRCoreContext.classForName(str);
        localFormula = (Formula)localClass.newInstance();
        paramXMLableReader.readXMLObject(localFormula);
      }
      catch (Exception localException)
      {
        FRContext.getLogger().log(Level.WARNING, localException.getMessage(), localException);
      }
    return localFormula;
  }

  public static Button readButton(XMLableReader paramXMLableReader)
  {
    String str;
    Button localButton = null;
    if ((str = paramXMLableReader.getAttr("class")) != null)
      try
      {
        Class localClass = FRCoreContext.classForName(str);
        localButton = (Button)localClass.newInstance();
        paramXMLableReader.readXMLObject(localButton);
      }
      catch (Exception localException)
      {
        FRContext.getLogger().log(Level.WARNING, localException.getMessage(), localException);
      }
    return localButton;
  }

  public static Present readPresent(XMLableReader paramXMLableReader)
  {
    String str;
    Object localObject = null;
    if ((str = paramXMLableReader.getAttr("class")) != null)
    {
      if (str.endsWith(".DictPresent"))
        localObject = new DictPresent();
      else if (str.endsWith(".BarcodePresent"))
        localObject = new BarcodePresent();
      else if (str.endsWith(".FormulaPresent"))
        localObject = new FormulaPresent();
      else if (str.endsWith(".DefaultPresent"))
        localObject = new DefaultPresent();
      else
        try
        {
          Class localClass = FRCoreContext.classForName(str);
          localObject = (Present)localClass.newInstance();
        }
        catch (Exception localException)
        {
          FRContext.getLogger().log(Level.WARNING, localException.getMessage(), localException);
        }
      paramXMLableReader.readXMLObject((XMLReadable)localObject);
    }
    return ((Present)localObject);
  }

  public static RecordGrouper readXMLRecordGrouper(XMLableReader paramXMLableReader)
  {
    String str2;
    String str1 = paramXMLableReader.getTagName();
    if ("GC".equals(str1))
      return readGroupCalculator2RecordGrouper(paramXMLableReader);
    if ("SpecifiedGroupAttr".equals(str1))
      return readGA2RecordGrouper(paramXMLableReader);
    Object localObject = null;
    if ((str2 = paramXMLableReader.getAttr("class")) != null)
    {
      if (str2.endsWith(".ValueGrouper"))
        localObject = new FunctionGrouper();
      else if (str2.endsWith(".IndexGrouper"))
        localObject = new IndexGrouper();
      else if (str2.endsWith(".MonoGrouper"))
        localObject = new MonoGrouper();
      else if (str2.endsWith(".SummaryGrouper"))
        localObject = new SummaryGrouper();
      else if (str2.endsWith(".CustomGrouper"))
        localObject = new CustomGrouper();
      else
        try
        {
          localObject = (RecordGrouper)FRCoreContext.classForName(str2).newInstance();
        }
        catch (Exception localException)
        {
          FRContext.getLogger().log(Level.WARNING, localException.getMessage(), localException);
        }
      paramXMLableReader.readXMLObject((XMLReadable)localObject);
    }
    return ((RecordGrouper)localObject);
  }

  private static RecordGrouper readGroupCalculator2RecordGrouper(XMLableReader paramXMLableReader)
  {
    Object localObject2;
    Object localObject1 = null;
    String str = paramXMLableReader.getAttr("class");
    if (str.endsWith(".DefaultGroupCalculator"))
    {
      paramXMLableReader.readXMLObject(localObject2 = new XMLObject(null)
      {
        public void readXML(XMLableReader paramXMLableReader)
        {
          if (paramXMLableReader.isChildNode())
          {
            String str = paramXMLableReader.getTagName();
            if (("GA".equals(str)) || ("SpecifiedGroupAttr".equals(str)))
              this.obj = ReportXMLUtils.access$500(paramXMLableReader);
          }
        }
      });
      localObject1 = (RecordGrouper)((XMLObject)localObject2).getObject();
    }
    else if (str.endsWith(".FormulaGroupCalculator"))
    {
      localObject2 = paramXMLableReader.getElementValue();
      if ((localObject2 != null) && (((String)localObject2).length() > 0))
      {
        localObject1 = new FunctionGrouper();
        ((FunctionGrouper)localObject1).setFormulaContent((String)localObject2);
      }
    }
    return ((RecordGrouper)(RecordGrouper)localObject1);
  }

  private static RecordGrouper readGA2RecordGrouper(XMLableReader paramXMLableReader)
  {
    String str;
    CustomGrouper localCustomGrouper = new CustomGrouper();
    if ((str = paramXMLableReader.getAttr("other")) != null)
      localCustomGrouper.setOther(Integer.parseInt(str));
    if ((str = paramXMLableReader.getAttr("odisplay")) != null)
      localCustomGrouper.setOdisplay(str);
    if ((str = paramXMLableReader.getAttr("force")) != null)
      localCustomGrouper.setForce(Boolean.valueOf(str).booleanValue());
    ArrayList localArrayList = new ArrayList();
    paramXMLableReader.readXMLObject(new XMLReadable(localArrayList)
    {
      private final java.util.List val$g_list;

      public void readXML(XMLableReader paramXMLableReader)
      {
        if ((paramXMLableReader.isChildNode()) && (paramXMLableReader.getTagName().equals("ConditionListGroup")))
        {
          ConditionGroup localConditionGroup = new ConditionGroup();
          paramXMLableReader.readXMLObject(localConditionGroup);
          this.val$g_list.add(localConditionGroup);
        }
      }
    });
    localCustomGrouper.setConditionGroups((ConditionGroup[])localArrayList.toArray(new ConditionGroup[localArrayList.size()]));
    return localCustomGrouper;
  }

  public static String passwordString(String paramString)
  {
    StringBuffer localStringBuffer = new StringBuffer();
    localStringBuffer.append("___");
    if (paramString == null)
      return localStringBuffer.toString();
    int i = 0;
    for (int j = 0; j < paramString.length(); ++j)
    {
      if (i == PasswordMaskArray.length)
        i = 0;
      int k = paramString.charAt(j) ^ PasswordMaskArray[i];
      String str = Integer.toHexString(k);
      int l = str.length();
      for (int i1 = 0; i1 < 4 - l; ++i1)
        str = "0" + str;
      localStringBuffer.append(str);
      ++i;
    }
    return localStringBuffer.toString();
  }

  public static String unPasswordString(String paramString)
  {
    if ((paramString != null) && (paramString.startsWith("___")))
    {
      paramString = paramString.substring(3);
      StringBuffer localStringBuffer = new StringBuffer();
      int i = 0;
      for (int j = 0; j <= paramString.length() - 4; j += 4)
      {
        if (i == PasswordMaskArray.length)
          i = 0;
        String str = paramString.substring(j, j + 4);
        int k = Integer.parseInt(str, 16) ^ PasswordMaskArray[i];
        localStringBuffer.append((char)k);
        ++i;
      }
      paramString = localStringBuffer.toString();
    }
    return paramString;
  }

  public static void writeBounds(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter, Rectangle2D paramRectangle2D)
  {
    if (paramRectangle2D == null)
      return;
    paramXMLPrintWriter.startTAG("Bounds").attr("x", paramRectangle2D.getX()).attr("y", paramRectangle2D.getY()).attr("w", paramRectangle2D.getWidth()).attr("h", paramRectangle2D.getHeight()).end();
  }

  public static Rectangle2D readBounds(XMLableReader paramXMLableReader)
  {
    return new Rectangle2D.Double(Utils.string2Number(paramXMLableReader.getAttr("x")).doubleValue(), Utils.string2Number(paramXMLableReader.getAttr("y")).doubleValue(), Utils.string2Number(paramXMLableReader.getAttr("w")).doubleValue(), Utils.string2Number(paramXMLableReader.getAttr("h")).doubleValue());
  }

  public static void writeArc2D(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter, Arc2D paramArc2D)
  {
    paramXMLPrintWriter.startTAG("Arc2D");
    if (paramArc2D instanceof Arc2D.Double)
      paramXMLPrintWriter.attr("type", "double");
    else if (paramArc2D instanceof Arc2D.Float)
      paramXMLPrintWriter.attr("type", "float");
    paramXMLPrintWriter.attr("x", paramArc2D.getX()).attr("y", paramArc2D.getY()).attr("width", paramArc2D.getWidth()).attr("height", paramArc2D.getHeight()).attr("start", paramArc2D.getAngleStart()).attr("extent", paramArc2D.getAngleExtent()).attr("intType", paramArc2D.getArcType()).end();
  }

  public static Arc2D readArc2D(XMLableReader paramXMLableReader)
  {
    String str;
    Object localObject = null;
    if ((str = paramXMLableReader.getAttr("type")) != null)
      if (str.equals("float"))
        localObject = new Arc2D.Float(Utils.string2Number(paramXMLableReader.getAttr("x")).floatValue(), Utils.string2Number(paramXMLableReader.getAttr("y")).floatValue(), Utils.string2Number(paramXMLableReader.getAttr("width")).floatValue(), Utils.string2Number(paramXMLableReader.getAttr("height")).floatValue(), Utils.string2Number(paramXMLableReader.getAttr("start")).floatValue(), Utils.string2Number(paramXMLableReader.getAttr("extent")).floatValue(), Utils.string2Number(paramXMLableReader.getAttr("intType")).intValue());
      else
        localObject = new Arc2D.Double(Utils.string2Number(paramXMLableReader.getAttr("x")).doubleValue(), Utils.string2Number(paramXMLableReader.getAttr("y")).doubleValue(), Utils.string2Number(paramXMLableReader.getAttr("width")).doubleValue(), Utils.string2Number(paramXMLableReader.getAttr("height")).doubleValue(), Utils.string2Number(paramXMLableReader.getAttr("start")).doubleValue(), Utils.string2Number(paramXMLableReader.getAttr("extent")).doubleValue(), Utils.string2Number(paramXMLableReader.getAttr("intType")).intValue());
    return ((Arc2D)localObject);
  }

  public static void writeRectangle2D(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter, Rectangle2D paramRectangle2D)
  {
    paramXMLPrintWriter.startTAG("Rectangle2D");
    if (paramRectangle2D instanceof Rectangle2D.Double)
      paramXMLPrintWriter.attr("type", "double");
    else if (paramRectangle2D instanceof Rectangle2D.Float)
      paramXMLPrintWriter.attr("type", "float");
    paramXMLPrintWriter.attr("x", paramRectangle2D.getX()).attr("y", paramRectangle2D.getY()).attr("width", paramRectangle2D.getWidth()).attr("height", paramRectangle2D.getHeight()).end();
  }

  public static Rectangle2D readRectangle2D(XMLableReader paramXMLableReader)
  {
    String str;
    Object localObject = null;
    if ((str = paramXMLableReader.getAttr("type")) != null)
      if (str.equals("float"))
        localObject = new Rectangle2D.Float(Float.valueOf(paramXMLableReader.getAttr("x")).floatValue(), Float.valueOf(paramXMLableReader.getAttr("y")).floatValue(), Float.valueOf(paramXMLableReader.getAttr("width")).floatValue(), Float.valueOf(paramXMLableReader.getAttr("height")).floatValue());
      else
        localObject = new Rectangle2D.Double(java.lang.Double.valueOf(paramXMLableReader.getAttr("x")).doubleValue(), java.lang.Double.valueOf(paramXMLableReader.getAttr("y")).doubleValue(), java.lang.Double.valueOf(paramXMLableReader.getAttr("width")).doubleValue(), java.lang.Double.valueOf(paramXMLableReader.getAttr("height")).doubleValue());
    return ((Rectangle2D)localObject);
  }

  public static void writeGeneralPath(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter, GeneralPath paramGeneralPath)
  {
    paramXMLPrintWriter.startTAG("GeneralPath");
    float[] arrayOfFloat = new float[6];
    PathIterator localPathIterator = paramGeneralPath.getPathIterator(null, 1.0D);
    while (!(localPathIterator.isDone()))
    {
      localPathIterator.currentSegment(arrayOfFloat);
      paramXMLPrintWriter.startTAG("Coord").attr("coords0", arrayOfFloat[0]).attr("coords1", arrayOfFloat[1]).end();
      localPathIterator.next();
    }
    paramXMLPrintWriter.startTAG("Type").attr("windingRule", paramGeneralPath.getWindingRule()).end();
    paramXMLPrintWriter.end();
  }

  public static GeneralPath readGeneralPath(XMLableReader paramXMLableReader)
  {
    int i = 1;
    GeneralPath localGeneralPath = new GeneralPath(1);
    if (paramXMLableReader.isChildNode())
    {
      String str1 = paramXMLableReader.getTagName();
      String str2 = null;
      float f1 = 0.0F;
      float f2 = 0.0F;
      if (str1.equals("Coord"))
      {
        if ((str2 = paramXMLableReader.getAttr("coords0")) != null)
          f1 = Float.valueOf(str2).floatValue();
        if ((str2 = paramXMLableReader.getAttr("coords1")) != null)
          f2 = Float.valueOf(str2).floatValue();
        if (i != 0)
        {
          i = 0;
          localGeneralPath.moveTo(f1, f2);
        }
        else
        {
          localGeneralPath.lineTo(f1, f2);
        }
      }
      else if (str1.equals("Type"))
      {
        localGeneralPath.setWindingRule(Integer.valueOf(str2).intValue());
      }
    }
    return localGeneralPath;
  }

  static RecordGrouper access$500(XMLableReader paramXMLableReader)
  {
    return readGA2RecordGrouper(paramXMLableReader);
  }

  private static final class ParameterEditor
    implements XMLReadable
  {
    private String name;
    private FieldEditor editor;
    private Object defaultValue;

    public void readXML(XMLableReader paramXMLableReader)
    {
      if (paramXMLableReader.isChildNode())
      {
        String str = paramXMLableReader.getTagName();
        if ("CellEditorDef".equals(str))
          this.editor = ReportXMLUtils.readFieldEditor(paramXMLableReader);
        else if ("O".equals(str))
          this.defaultValue = ReportXMLUtils.readObject(paramXMLableReader);
        else if ("Name".equals(str))
          this.name = paramXMLableReader.getElementValue();
      }
    }

    public FieldEditor toFieldEditor()
    {
      if (this.editor != null)
        this.editor.setFieldName(this.name);
      return this.editor;
    }
  }

  private static class ElseAsString extends ReportXMLUtils.ObjectXMLWriter
  {
    private Object ob;

    ElseAsString(Object paramObject)
    {
      super(null);
      this.ob = paramObject;
    }

    public void writeXML(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter)
    {
      paramXMLPrintWriter.textNode(BaseCoreUtils.writeESC(Utils.objectToString(this.ob)));
    }
  }

  private static class REPORT extends ReportXMLUtils.XML
  {
    REPORT(Report paramReport)
    {
      super(null);
      this.xml = paramReport;
    }

    public String type()
    {
      return "Report";
    }

    public String className()
    {
      return this.xml.getClass().getName();
    }
  }

  private static class SP extends ReportXMLUtils.XML
  {
    SP(ShapePainter paramShapePainter)
    {
      super(null);
      this.xml = paramShapePainter;
    }

    public String type()
    {
      return "ShapePainter";
    }

    public String className()
    {
      return this.xml.getClass().getName();
    }
  }

  private static class TABLECOLUMN extends ReportXMLUtils.XML
  {
    TABLECOLUMN(TableColumn paramTableColumn)
    {
      super(null);
      this.xml = paramTableColumn;
    }

    public String type()
    {
      return "TableColumn";
    }
  }

  private static class RESULTSUBREPORT extends ReportXMLUtils.XML
  {
    RESULTSUBREPORT(ResultSubReport paramResultSubReport)
    {
      super(null);
      this.xml = paramResultSubReport;
    }

    public String type()
    {
      return "ResultSubReport";
    }
  }

  private static class SUBREPORT extends ReportXMLUtils.XML
  {
    SUBREPORT(SubReport paramSubReport)
    {
      super(null);
      this.xml = paramSubReport;
    }

    public String type()
    {
      return "SubReport";
    }
  }

  private static class DSCOLUMN extends ReportXMLUtils.XML
  {
    DSCOLUMN(DSColumn paramDSColumn)
    {
      super(null);
      this.xml = paramDSColumn;
    }

    public String type()
    {
      return "DSColumn";
    }
  }

  private static class PARA extends ReportXMLUtils.XML
  {
    PARA(Parameter paramParameter)
    {
      super(null);
      this.xml = paramParameter;
    }

    public String type()
    {
      return "Parameter";
    }
  }

  private static class BTP extends ReportXMLUtils.XML
  {
    BTP(BiasTextPainter paramBiasTextPainter)
    {
      super(null);
      this.xml = paramBiasTextPainter;
    }

    public String type()
    {
      return "BiasTextPainter";
    }
  }

  private static class CP extends ReportXMLUtils.XML
  {
    CP(ChartPainter paramChartPainter)
    {
      super(null);
      this.xml = paramChartPainter;
    }

    public String type()
    {
      return "CP";
    }
  }

  private static class CC extends ReportXMLUtils.XML
  {
    CC(ChartCollection paramChartCollection)
    {
      super(null);
      this.xml = paramChartCollection;
    }

    public String type()
    {
      return "CC";
    }
  }

  private static class FORMULA extends ReportXMLUtils.XML
  {
    FORMULA(Formula paramFormula)
    {
      super(null);
      this.xml = paramFormula;
    }

    public String type()
    {
      return "Formula";
    }

    public String className()
    {
      String str = this.xml.getClass().getName();
      if (str.endsWith(".Formula"))
        str = "Formula";
      return str;
    }
  }

  private static class FARRAYXML extends ReportXMLUtils.XML
  {
    public FARRAYXML(FArray paramFArray)
    {
      super(null);
      this.xml = paramFArray;
    }

    public String type()
    {
      return "FARRAY";
    }
  }

  private static abstract class XML extends ReportXMLUtils.ObjectXMLWriter
  {
    protected XMLWriter xml;

    private XML()
    {
      super(null);
    }

    public void writeXML(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter)
    {
      this.xml.writeXML(paramXMLPrintWriter);
    }

    XML(ReportXMLUtils.1 param1)
    {
    }
  }

  private static class IMAGE extends ReportXMLUtils.ObjectXMLWriter
  {
    private Image im;

    IMAGE(Image paramImage)
    {
      super(null);
      this.im = paramImage;
    }

    public String type()
    {
      return "Image";
    }

    public void writeXML(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter)
    {
      BaseXMLUtils.writeImage(paramXMLPrintWriter, this.im);
    }
  }

  private static class DATE extends ReportXMLUtils.ObjectXMLWriter
  {
    private Date d;

    DATE(Date paramDate)
    {
      super(null);
      this.d = paramDate;
    }

    public String type()
    {
      return "Date";
    }

    public void writeXML(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter)
    {
      paramXMLPrintWriter.textNode(String.valueOf(this.d.getTime()));
    }
  }

  private static class BIGD extends ReportXMLUtils.ToString
  {
    BIGD(BigDecimal paramBigDecimal)
    {
      super(null);
      this.ob = paramBigDecimal;
    }

    public String type()
    {
      return "BigDecimal";
    }
  }

  private static class BIGI extends ReportXMLUtils.ToString
  {
    BIGI(BigInteger paramBigInteger)
    {
      super(null);
      this.ob = paramBigInteger;
    }

    public String type()
    {
      return "BigInteger";
    }
  }

  private static class FLOAT extends ReportXMLUtils.ToString
  {
    FLOAT(Float paramFloat)
    {
      super(null);
      this.ob = paramFloat;
    }

    public String type()
    {
      return "F";
    }
  }

  private static class DOUBLE extends ReportXMLUtils.ToString
  {
    DOUBLE(java.lang.Double paramDouble)
    {
      super(null);
      this.ob = paramDouble;
    }

    public String type()
    {
      return "D";
    }
  }

  private static class INTEGER extends ReportXMLUtils.ToString
  {
    INTEGER(Integer paramInteger)
    {
      super(null);
      this.ob = paramInteger;
    }

    public String type()
    {
      return "I";
    }
  }

  private static class BOOLEAN extends ReportXMLUtils.ToString
  {
    BOOLEAN(Boolean paramBoolean)
    {
      super(null);
      this.ob = paramBoolean;
    }

    public String type()
    {
      return "B";
    }
  }

  private static abstract class ToString extends ReportXMLUtils.ObjectXMLWriter
  {
    protected Object ob;

    private ToString()
    {
      super(null);
    }

    public void writeXML(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter)
    {
      paramXMLPrintWriter.textNode(this.ob.toString());
    }

    ToString(ReportXMLUtils.1 param1)
    {
    }
  }

  private static class NULL extends ReportXMLUtils.ObjectXMLWriter
  {
    private NULL()
    {
      super(null);
    }

    public String type()
    {
      return "NULL";
    }

    NULL(ReportXMLUtils.1 param1)
    {
    }
  }

  private static abstract class ObjectXMLWriter
    implements XMLWriter
  {
    private ObjectXMLWriter()
    {
    }

    public String type()
    {
      return null;
    }

    public String className()
    {
      return null;
    }

    public void writeXML(com.fr.base.xml.XMLPrintWriter paramXMLPrintWriter)
    {
    }

    ObjectXMLWriter(ReportXMLUtils.1 param1)
    {
    }
  }
}